;(function(){
    let myChart = echarts.init(document.querySelector('div.box-center2'))

    let option = {
      xAxis:{
        type:'category',
        data:[1,2,3,4,5,6,7,8,9,10,11,12],
      },
      legend:{
        data:['图例一','图例二','完成率'],
        textStyle:{
          color:'rgb(255,255,255,0.9)'
        },
        top:30,
      },
      yAxis:[
        {
          name:'金额',
          type:'value',
          axisLine:{ show:true },
          axisTick:{ show:true },
          splitLine:{ show:false },
          max: 50,
          min: 0,
        },
        {
          name:'完成率',
          type:'value',
          axisLine:{ show:true },
          axisTick:{ show:true },
          splitLine:{ show:false },
          max: 100,
          min: 0,
        },
      ],
      grid: {
        bottom: 30,
      },
      series:[
        {
          name:'图例一',
          type:'bar',
          data:[11,22,33,44,35,26,47,18,9,20,29,17],
        },
        {
          name:'图例二',
          type:'bar',
          data: [1,2,3,44,33,11,11,22,12,11,11,22],
        },
        {
          name:'完成率',
          type:'line',
          smooth:true,      // 折线丝滑
          data: [1,2,3,44,33,3,22,32,12,21,11,22],
        },
      ]
    };
    
    myChart.setOption(option)

    window.addEventListener('resize',() => {
        myChart.resize()
    })
})()